@extends('layouts.app')

@section('content')
    <div class="row mb-5">
        <div class="col-lg-9 col-md-9 article-list">
            <div class="whitebg bloglist">
                <h2 class="htitle"><span class="con_nav">您现在的位置是：
                    <a href="{{ route('articles.index') }}">个人博客</a>><a href="{{ route('tags.show',$tag->id) }}">{{ $tag->name }}</a></span>{{$tag->name}}
                </h2>

                <ul>
                    <!--纯文字-->
                    @foreach($articles as $v)
                        <li>
                            <h3 class="blogtitle"><a href="{{ $v->link() }}" target="_blank">{{ $v->title }}</a></h3>
                            <p class="blogtext">{{ str_limit(strip_tags($v->body), 45, '...') }} </p>
                            <p class="bloginfo"><i class="avatar">
                                    @if(substr($v['user']['avatar'],0,4) != 'http')
                                        <img src="{{asset('admin/upload')}}/{{ $v['user']['avatar'] }}">
                                    @else
                                        <img src="{{  $v['user']['avatar'] }}" >
                                    @endif
                                </i><span>{{ $v['user']['name'] }}</span><span>{{ $v->updated_at }}</span><span>【<a href="/">{{ $v['category']['name'] }}</a>】</span></p>
                            <a href="{{ $v->link() }}" class="viewmore">阅读更多</a> </li>
                    @endforeach
                </ul>
            </div>
        </div>

        <div class="col-lg-3 col-md-3 sidebar">
            @include('layouts._sidebar')
        </div>
    </div>
@stop
@section('styles')
    <link rel="stylesheet" href="{{ asset('css/article.css') }}">
@stop